using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Diagnostics;

namespace System.IPod
{
	public class DataBlob : Node
	{
		MhodBlob m_mhodBlob;

		protected override int Size
		{
			get { return m_mhodBlob.Data.Length; }
		}

		protected override void ReadImpl(BinaryReader reader)
		{
			DataObject obj = Parent as DataObject;
			Debug.Assert(obj != null, "Must have parent object");

			m_mhodBlob.Read(reader, obj.TotalLength - 24);
		}

		protected override void WriteImpl(BinaryWriter writer)
		{
			m_mhodBlob.Write(writer);
		}

		protected override void SetSize(int size) { }
	}
}
